<?php
/**
 * @version		0.2.0 joomla zmluvy $
 * @package		com_zjmluvy
 * @copyright	Copyright © 2011 - All rights reserved.
 * @license		GNU/GPL
 * @author    AdrianKo		
 * @website   http://code.google.com/p/joomla-zmluvy
 *
 *
 *1.3.2012
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

//*** pridanie vlastnych ikon pre title - zatial tu, potom sa to presunie :)
$iconStyle = '.icon-48-partneri     { background-image: url(components/com_jzmluvy/assets/images/controlpanel/cp_partneri.png) } '.
$iconStyle = '.icon-48-controlpanel { background-image: url(components/com_jzmluvy/assets/images/controlpanel/cp_controlpanel.png) } '.
$iconStyle = '.icon-48-zmluvy       { background-image: url(components/com_jzmluvy/assets/images/controlpanel/cp_zmluvy.png) } '.
$iconStyle = '.icon-48-faktury      { background-image: url(components/com_jzmluvy/assets/images/controlpanel/cp_faktury.png) } '.
$iconStyle = '.icon-48-objednavky   { background-image: url(components/com_jzmluvy/assets/images/controlpanel/cp_objednavky.png) } '.
$iconStyle = '.icon-48-nastavenie   { background-image: url(components/com_jzmluvy/assets/images/controlpanel/cp_settings.png) } ' ;
  
//*** pridanie stylu do kodu stranky
$document =& JFactory::getDocument() ;
$document->addStyleDeclaration($iconStyle);
   
// Require the base controller
require_once (JPATH_COMPONENT.DS.'controller.php');

// Set the table directory
JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');

// Require the base controller
require_once (JPATH_COMPONENT.DS.'controller.php');

// Require the helper
require_once( JPATH_COMPONENT.DS.'helper.php' );

// Require specific controller if requested
if( $controller = JRequest::getWord('controller') ) {
	$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
	if (file_exists($path)) {
		require_once $path;
	} else {
		$controller = '';
	}
}

// Create the controller
$classname  = 'jzmluvyController'.$controller;
$controller = new $classname( );

// Perform the Request task
$controller->execute(JRequest::getVar('task', null, 'default', 'cmd'));
$controller->redirect();
?>
